public class Factory {
    public Factory(){
    }
    public static Car getCarInstanceByType(String carTypeName){
        Car car = null;
        switch(carTypeName){
            case "奔驰":car = new 奔驰();break;
            case "大众":car = new 大众();break;
            case "小米":car = new 小米();break;
        }
        return car;
    }
}
